package com.armani.service.impl;

import com.armani.entity.Great;
import com.armani.mapper.GreatMapper;
import com.armani.service.GreatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ProjectName: armani
 * @Package: com.armani.service.impl
 * @ClassName: GreatServiceImpl
 * @Description: TODO
 * @Author: Xinyibuzai
 * @Date: 2021/11/28 17:14
 * @Version: 1.0
 **/
@Service
public class GreatServiceImpl implements GreatService {

    @Autowired
    private GreatMapper greatMapper;
    @Override
    public List<Great> listSearch(Integer startRow, Integer limit, String name) {
        return greatMapper.listSearch(startRow, limit, name);
    }

    @Override
    public Integer getCount(String name) {
        return greatMapper.getCount(name);
    }

    @Override
    public void update(String name, String image, String url, Integer spuId, Integer state, Integer sort, Integer id) {
        greatMapper.update(name, image, url, spuId, state, sort, id);
    }

    @Override
    public void insert(String name, String image, String url, Integer spuId, Integer state, Integer sort) {
        greatMapper.insert(name, image, url, spuId, state, sort);
    }

    @Override
    public void delete(Integer id) {
        greatMapper.delete(id);
    }

    @Override
    public Integer state(Integer id, Integer state) {
        return greatMapper.state(id, state);
    }

    @Override
    public List<Great> pageSearch(String name) {
        return greatMapper.pageSearch(name);
    }
}
